import { createApp } from 'vue'


// 引入element plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 引入图标视图
import * as ELIcons from '@element-plus/icons-vue'
// 引入App.vue主组件
import App from './App.vue'
// 引入路由配置和规则
import router from './router'

// 引入codemirror，遇到错误cannot resolv是因为包不全，重新装一遍
import { GlobalCmComponent } from "codemirror-editor-vue3";
import 'codemirror/theme/idea.css';
import 'codemirror/mode/yaml/yaml.js';

//创建vue实例
const app = createApp(App)
// 将图标注册为全局组件
for (let iconName in ELIcons){
  app.component(iconName,ELIcons[iconName])
}

// 引入codemirror
app.use(GlobalCmComponent)
// 引入element plus
app.use(ElementPlus)
// 引入路由
app.use(router)
//挂载
app.mount('#app')